<template>
  <div>
    <child message="hello child" :num="1" @tellParent="parentDo" />
    <div>{{ val }}</div>
  </div>
</template>
<script setup lang="ts">
import { ref } from "vue";
import child from "./child.vue";
const val = ref(0);
const parentDo = (num: number) => {
  val.value += num;
};
</script>
<style lang="scss" scoped></style>
